-- GENERATED SPELL FOR [Horgrenn Hellcleave] --


function spell0_27718(pUnit, Event) --@Intimidating Roar,n/a--
pUnit:FullCastSpellOnTarget(16508,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27718', 8311, 1)
end

function spell1_27718(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(39171,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27718', 5321, 1)
end

function spell2_27718(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(15572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27718', 30317, 1)
end

function spell3_27718(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_27718', 567, 1)
end

function spell4_27718(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_27718', 2000, 1)
end

function Sorts_27718(pUnit, Event)
local choix_sorts_27718 = math.random(0, 4)
if choix_sorts_27718 == 0 then
pUnit:RegisterEvent('spell0_27718', 1, 1)
end
if choix_sorts_27718 == 1 then
pUnit:RegisterEvent('spell1_27718', 1, 1)
end
if choix_sorts_27718 == 2 then
pUnit:RegisterEvent('spell2_27718', 1, 1)
end
if choix_sorts_27718 == 3 then
pUnit:RegisterEvent('spell3_27718', 1, 1)
end
if choix_sorts_27718 == 4 then
pUnit:RegisterEvent('spell4_27718', 1, 1)
end
end

function mob27718_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27718', math.random(1500, 3000), 1)
end

function mob27718_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27718_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27718_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27718, 1, 'mob27718_Action')
RegisterUnitEvent(27718, 2, 'mob27718_Leave')
RegisterUnitEvent(27718, 3, 'mob27718_Kill')
RegisterUnitEvent(27718, 4, 'mob27718_Die')
